home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / tlp4v11c / include / lp4supp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-03  |  2.5 KB  |  91 lines

  1. /* LP4 Support Library Application Header
  2.  * Copyright (C) 1994 Tale Software
  3.  * All rights reserved.
  4.  */
  5.  
  6. /* LP4SUPP.H already included? */
  7. #ifndef LP4SUPP_H
  8. #define LP4SUPP_H
  9.  
  10. /* define common tgdlp4 data types and structures */
  11. #include "tgdconst.h"
  12.  
  13. /* LP4 format Version 1.2 */
  14. #define LP4_VERSION 1
  15. #define LP4_REVISION 2
  16.  
  17. /* LP4 font types */
  18. #define LP4_FONT_FIXED 0
  19. #define LP4_FONT_PROP 1
  20.  
  21. /* define errors */
  22. #define LP4ERR_NOFILE 1
  23. #define LP4ERR_BADFILE 2
  24. #define LP4ERR_NOMEM 3
  25. #define LP4ERR_EOF 4
  26.  
  27. /* define LP4 structures */
  28.  
  29. /* file color map header */
  30. typedef struct { ubyte colors;
  31.            } cmhdr;
  32.  
  33. /* file bit map header */
  34. typedef struct { uword xsize,ysize;
  35.          uword bytespline;
  36.          udword maxbitmaplen;
  37.          udword planeoffset[4];
  38.            } bmhdr;
  39.  
  40. /* file font map header */
  41. typedef struct { ubyte fonttype;
  42.          ubyte startchr,stopchr;
  43.          ubyte pad;        /* for word alignment */
  44.          uword chrxsize,chrysize;
  45.          word spacingx,spacingy;
  46.          bmhdr fontbitmap;
  47. /*               uword propxsize[256];     only for proportional width fonts */
  48.            } fmhdr;
  49.  
  50. /* file sprite map header */
  51. typedef struct { ubyte animseqno;
  52.          ubyte pad;        /* for word alignment */
  53.          uword animseqsize;
  54.          bmhdr spritebitmap;
  55.            } smhdr;
  56.  
  57.  
  58. /* LP4 Support Library bitmap descriptor */
  59. typedef struct { cmhdr huge *cmdescr;
  60.          ubyte far *cmap;        /* this is a huge ptr really */
  61.          bmhdr huge *bmdescr;
  62.          ubyte huge *bmap;
  63.          bitmap far *tgdbmdescr;    /* this is a huge ptr really */
  64.            } bcdescr;
  65.  
  66. /* LP4 Support Library font descriptor */
  67. typedef struct { cmhdr huge *cmdescr;
  68.          ubyte far *cmap;        /* this is a huge ptr really */
  69.          fmhdr huge *fmdescr;
  70.          ubyte huge *bmap;
  71.          fontmap far *tgdfmdescr;   /* this is a huge ptr really */
  72.            } fcdescr;
  73.  
  74. /* LP4 Support Library sprite descriptor */
  75. typedef struct { cmhdr huge *cmdescr;
  76.          ubyte far *cmap;        /* this is a huge ptr really */
  77.          smhdr huge *smdescr;
  78.          ubyte huge *bmap;
  79.          spritemap far *tgdsmdescr; /* this is a huge ptr really */
  80.            } scdescr;
  81.  
  82. /* these procedures are currently available */
  83. void freebc(bcdescr huge *bcinfo);
  84. bcdescr huge *readbc(const char far *filename,ubyte bcnumber,ubyte far *loaderr);
  85. void freefc(fcdescr huge *fcinfo);
  86. fcdescr huge *readfc(const char far *filename,ubyte fcnumber,ubyte far *loaderr);
  87. void freesc(scdescr huge *scinfo);
  88. scdescr huge *readsc(const char far *filename,ubyte scnumber,ubyte far *loaderr);
  89.  
  90. #endif /* LP4SUPP_H */
  91.